(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 10.4' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     30350,       1135]
NotebookOptionsPosition[     25322,        977]
NotebookOutlinePosition[     27397,       1033]
CellTagsIndexPosition[     27311,       1028]
WindowTitle->DiracGammaExpand
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {Cell["FEYN CALC SYMBOL", "PacletNameCell"], Cell[TextData[{
     Cell[BoxData[
      ActionMenuBox[
       FrameBox[
        InterpretationBox[Cell[TextData[{
          "See Also",
          StyleBox[" \[FilledDownTriangle]", "AnchorBarArrow",
           StripOnInput->False]
         }]],
         TextCell[
          Row[{"See Also", 
            Style[" \[FilledDownTriangle]", "AnchorBarArrow"]}]]],
        StripOnInput->False], {"\<\"DiracGamma\"\>":>Documentation`HelpLookup[
       "paclet:FeynCalc/ref/DiracGamma"], "\<\"DiracGammaCombine\"\>":>
       Documentation`HelpLookup[
       "paclet:FeynCalc/ref/DiracGammaCombine"], "\<\"DiracSimplify\"\>":>
       Documentation`HelpLookup[
       "paclet:FeynCalc/ref/DiracSimplify"], "\<\"DiracTrick\"\>":>
       Documentation`HelpLookup["paclet:FeynCalc/ref/DiracTrick"]},
       Appearance->None,
       MenuAppearance->Automatic,
       MenuStyle->"SeeAlso"]],
      LineSpacing->{1.4, 0}],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      ActionMenuBox[
       FrameBox[
        InterpretationBox[Cell[TextData[{
          "URL",
          StyleBox[" \[FilledDownTriangle]", "AnchorBarArrow",
           StripOnInput->False]
         }]],
         TextCell[
          Row[{"URL", 
            Style[" \[FilledDownTriangle]", "AnchorBarArrow"]}]]],
        StripOnInput->False], {"\<\"FeynCalc/ref/DiracGammaExpand\"\>":>
       None, "\<\"Copy Wolfram Documentation Center URL\"\>":>
       Module[{DocumentationSearch`Private`nb$}, 
        DocumentationSearch`Private`nb$ = NotebookPut[
           Notebook[{
             Cell["FeynCalc/ref/DiracGammaExpand"]}, Visible -> False]]; 
        SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
        FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
        NotebookClose[DocumentationSearch`Private`nb$]; Null], 
       Delimiter, "\<\"Copy web URL\"\>":>
       Module[{DocumentationSearch`Private`nb$}, 
        DocumentationSearch`Private`nb$ = NotebookPut[
           Notebook[{
             Cell[
              BoxData[
               MakeBoxes[
                Hyperlink[
                "http://reference.wolfram.com/language/FeynCalc/ref/\
DiracGammaExpand.html"], StandardForm]], "Input", TextClipboardType -> 
              "PlainText"]}, Visible -> False]]; 
        SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
        FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
        NotebookClose[DocumentationSearch`Private`nb$]; 
        Null], "\<\"Go to web URL\"\>":>FrontEndExecute[{
         NotebookLocate[{
           URL[
            StringJoin[
             If[
              TrueQ[DocumentationBuild`Make`Private`wsmlinkQ$64963], 
              "http://reference.wolfram.com/system-modeler/", 
              "http://reference.wolfram.com/language/"], 
             "FeynCalc/ref/DiracGammaExpand", ".html"]], None}]}]},
       Appearance->None,
       MenuAppearance->Automatic,
       MenuStyle->"URLMenu"]],
      LineSpacing->{1.4, 0}]
    }], "AnchorBar"]}
  }]], "AnchorBarGrid",
 GridBoxOptions->{GridBoxItemSize->{"Columns" -> {
     Scaled[0.65], {
      Scaled[0.34]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, 
   "RowsIndexed" -> {}}},
 CellID->1],

Cell[TextData[{
 Cell["DiracGammaExpand", "ObjectName"],
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{8, 0}],
    CacheGraphics->False],
   Spacer[8]]]],
 Cell[BoxData[""], "ObjectNameTranslation"]
}], "ObjectNameGrid"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{"DiracGammaExpand", "[", "exp", "]"}]], "InlineFormula"],
     " \[LineSeparator]expands Dirac matrices contracted to linear \
combinations of ",
     Cell[BoxData["4"], "InlineFormula"],
     "-vectors."
    }]]}
  }]], "Usage",
 GridBoxOptions->{
 GridBoxBackground->{
  "Columns" -> {{None}}, "ColumnsIndexed" -> {}, "Rows" -> {{None}}, 
   "RowsIndexed" -> {}}},
 CellID->982511436],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[
 ButtonBox[Cell[TextData[{
   Cell[BoxData[
    InterpretationBox[
     StyleBox[
      GraphicsBox[{},
       BaselinePosition->Baseline,
       ImageSize->{6, 0}],
      CacheGraphics->False],
     Spacer[6]]]],
   "Details"
  }], "NotesFrameText"],
  Appearance->{Automatic, None},
  BaseStyle->None,
  ButtonFunction:>(FrontEndExecute[{
     FrontEnd`SelectionMove[
      FrontEnd`SelectedNotebook[], All, ButtonCell], 
     FrontEndToken["OpenCloseGroup"], 
     FrontEnd`SelectionMove[
      FrontEnd`SelectedNotebook[], After, CellContents]}]& ),
  Evaluator->None,
  Method->"Preemptive"]]]], "NotesSection",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->36006772],

Cell["", "SectionHeaderSpacer"],

Cell[TextData[{
 "All ",
 Cell[BoxData[
  RowBox[{"DiracGamma", "[", 
   RowBox[{"Momentum", "[", 
    RowBox[{
     RowBox[{"a", "+", "b", "+"}], ".."}], "]"}], "]"}]], "InlineFormula"],
 " will be expanded to ",
 Cell[BoxData[
  RowBox[{"(", 
   RowBox[{
    RowBox[{
     RowBox[{"DiracGamma", "[", 
      RowBox[{"Momentum", "[", "a", "]"}], "]"}], "+", 
     RowBox[{"DiracGamma", "[", 
      RowBox[{"Momentum", "[", "b", "]"}], "]"}], "+"}], "..."}], ")"}]], 
  "InlineFormula"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Options", "[", "DiracGammaExpand", "]"}]], "Input",
 CellLabel->"In[141]:="],

Cell[BoxData[
 FormBox[
  RowBox[{"{", 
   RowBox[{
    RowBox[{"DiracSigmaExpand", "\[Rule]", "True"}], ",", 
    RowBox[{"FeynCalcExternal", "\[Rule]", "False"}], ",", 
    RowBox[{"FeynCalcInternal", "\[Rule]", "False"}], ",", 
    RowBox[{"Momentum", "\[Rule]", "All"}]}], "}"}], 
  TraditionalForm]], "Output",
 ImageSize->{327, 35},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[141]="]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{6, 0}],
    CacheGraphics->False],
   Spacer[6]]]],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(5)", "ExampleCount"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CellTags->"PrimaryExamplesSection",
 CellID->378744683],

Cell[CellGroupData[{

Cell[TextData[{
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(5)", "ExampleCount"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CellID->703574402],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"GS", "[", "q", "]"}], ".", 
  RowBox[{"GS", "[", 
   RowBox[{"p", "-", "q"}], "]"}]}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"(", 
    FormBox[
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}],
     TraditionalForm], ")"}], ".", 
   RowBox[{"(", 
    FormBox[
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", "(", 
      FormBox[
       FormBox[
        RowBox[{
         OverscriptBox[
          FormBox["p",
           TraditionalForm], "_"], "-", 
         OverscriptBox[
          FormBox["q",
           TraditionalForm], "_"]}],
        TraditionalForm],
       TraditionalForm], ")"}],
     TraditionalForm], ")"}]}], TraditionalForm]], "Output",
 ImageSize->{143, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[TextData[{
 ButtonBox["DiracGammaExpand",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaExpand",
  ButtonNote->"DiracGammaExpand"],
 " rewrites ",
 Cell[BoxData[
  RowBox[{
   SuperscriptBox["\[Gamma]", "\[Mu]"], 
   SubscriptBox[
    RowBox[{"(", 
     RowBox[{"p", "-", "q"}], ")"}], "\[Mu]"]}]], "InlineFormula"],
 " as ",
 Cell[BoxData[
  RowBox[{
   RowBox[{
    SuperscriptBox["\[Gamma]", "\[Mu]"], 
    SubscriptBox["p", "\[Mu]"]}], "-", 
   RowBox[{
    SuperscriptBox["\[Gamma]", "\[Mu]"], 
    SubscriptBox["q", "\[Mu]"]}]}]], "InlineFormula"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracGammaExpand", "[", "%", "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
     FormBox[
      OverscriptBox[
       FormBox["q",
        TraditionalForm], "_"],
      TraditionalForm]}], ")"}], ".", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["p",
         TraditionalForm], "_"],
       TraditionalForm]}], "-", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}]}], ")"}]}], TraditionalForm]], "Output",
 ImageSize->{151, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"StandardForm", "[", "%", "]"}]], "Input",
 CellLabel->"In[3]:="],

Cell[BoxData[
 RowBox[{
  RowBox[{"DiracGamma", "[", 
   RowBox[{"Momentum", "[", "q", "]"}], "]"}], ".", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"DiracGamma", "[", 
     RowBox[{"Momentum", "[", "p", "]"}], "]"}], "-", 
    RowBox[{"DiracGamma", "[", 
     RowBox[{"Momentum", "[", "q", "]"}], "]"}]}], ")"}]}]], "Output",
 ImageSize->{423, 33},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[3]//StandardForm="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 "The inverse operation is ",
 ButtonBox["DiracGammaCombine",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaCombine",
  ButtonNote->"DiracGammaCombine"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"GS", "[", "q", "]"}], ".", 
  RowBox[{"(", 
   RowBox[{
    RowBox[{"GS", "[", "p", "]"}], "-", 
    RowBox[{"GS", "[", "q", "]"}]}], ")"}]}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"(", 
    FormBox[
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}],
     TraditionalForm], ")"}], ".", 
   RowBox[{"(", 
    RowBox[{
     FormBox[
      RowBox[{
       OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
       FormBox[
        OverscriptBox[
         FormBox["p",
          TraditionalForm], "_"],
        TraditionalForm]}],
      TraditionalForm], "-", 
     FormBox[
      RowBox[{
       OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
       FormBox[
        OverscriptBox[
         FormBox["q",
          TraditionalForm], "_"],
        TraditionalForm]}],
      TraditionalForm]}], ")"}]}], TraditionalForm]], "Output",
 ImageSize->{151, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracGammaCombine", "[", "%", "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
     FormBox[
      OverscriptBox[
       FormBox["q",
        TraditionalForm], "_"],
      TraditionalForm]}], ")"}], ".", 
   RowBox[{"(", 
    RowBox[{
     OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", "(", 
     FormBox[
      FormBox[
       RowBox[{
        OverscriptBox[
         FormBox["p",
          TraditionalForm], "_"], "-", 
        OverscriptBox[
         FormBox["q",
          TraditionalForm], "_"]}],
       TraditionalForm],
      TraditionalForm], ")"}], ")"}]}], TraditionalForm]], "Output",
 ImageSize->{143, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"StandardForm", "[", "%", "]"}]], "Input",
 CellLabel->"In[3]:="],

Cell[BoxData[
 RowBox[{
  RowBox[{"DiracGamma", "[", 
   RowBox[{"Momentum", "[", "q", "]"}], "]"}], ".", 
  RowBox[{"DiracGamma", "[", 
   RowBox[{"Momentum", "[", 
    RowBox[{"p", "-", "q"}], "]"}], "]"}]}]], "Output",
 ImageSize->{416, 15},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[3]//StandardForm="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell["\<\
It is possible to perform the expansions only on Dirac matrices contracted \
with particular momenta.\
\>", "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"c1", " ", 
   RowBox[{
    RowBox[{"GAD", "[", "\[Mu]", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"GSD", "[", 
       RowBox[{"p1", "+", "p2"}], "]"}], "+", "m"}], ")"}], ".", 
    RowBox[{"GAD", "[", "\[Nu]", "]"}]}]}], "+", "\[IndentingNewLine]", 
  RowBox[{"c2", " ", 
   RowBox[{
    RowBox[{"GAD", "[", "\[Mu]", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"GSD", "[", 
       RowBox[{"q1", "+", "q2"}], "]"}], "+", "m"}], ")"}], ".", 
    RowBox[{"GAD", "[", "\[Nu]", "]"}]}]}]}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"c1", " ", 
    RowBox[{
     FormBox[
      SuperscriptBox["\[Gamma]", 
       FormBox[
        FormBox["\[Mu]",
         TraditionalForm],
        TraditionalForm]],
      TraditionalForm], ".", 
     RowBox[{"(", 
      RowBox[{"m", "+", 
       FormBox[
        RowBox[{"\[Gamma]", "\[CenterDot]", "(", 
         FormBox[
          FormBox[
           RowBox[{
            FormBox["p1",
             TraditionalForm], "+", 
            FormBox["p2",
             TraditionalForm]}],
           TraditionalForm],
          TraditionalForm], ")"}],
        TraditionalForm]}], ")"}], ".", 
     FormBox[
      SuperscriptBox["\[Gamma]", 
       FormBox[
        FormBox["\[Nu]",
         TraditionalForm],
        TraditionalForm]],
      TraditionalForm]}]}], "+", 
   RowBox[{"c2", " ", 
    RowBox[{
     FormBox[
      SuperscriptBox["\[Gamma]", 
       FormBox[
        FormBox["\[Mu]",
         TraditionalForm],
        TraditionalForm]],
      TraditionalForm], ".", 
     RowBox[{"(", 
      RowBox[{"m", "+", 
       FormBox[
        RowBox[{"\[Gamma]", "\[CenterDot]", "(", 
         FormBox[
          FormBox[
           RowBox[{
            FormBox["q1",
             TraditionalForm], "+", 
            FormBox["q2",
             TraditionalForm]}],
           TraditionalForm],
          TraditionalForm], ")"}],
        TraditionalForm]}], ")"}], ".", 
     FormBox[
      SuperscriptBox["\[Gamma]", 
       FormBox[
        FormBox["\[Nu]",
         TraditionalForm],
        TraditionalForm]],
      TraditionalForm]}]}]}], TraditionalForm]], "Output",
 ImageSize->{393, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracGammaExpand", "[", 
  RowBox[{"%", ",", 
   RowBox[{"Momentum", "\[Rule]", 
    RowBox[{"{", "q1", "}"}]}]}], "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"c1", " ", 
    RowBox[{
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Mu]",
        TraditionalForm],
       TraditionalForm]], ".", 
     RowBox[{"(", 
      RowBox[{"m", "+", 
       RowBox[{"\[Gamma]", "\[CenterDot]", "(", 
        FormBox[
         FormBox[
          RowBox[{
           FormBox["p1",
            TraditionalForm], "+", 
           FormBox["p2",
            TraditionalForm]}],
          TraditionalForm],
         TraditionalForm], ")"}]}], ")"}], ".", 
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Nu]",
        TraditionalForm],
       TraditionalForm]]}]}], "+", 
   RowBox[{"c2", " ", 
    RowBox[{
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Mu]",
        TraditionalForm],
       TraditionalForm]], ".", 
     RowBox[{"(", 
      RowBox[{"m", "+", 
       RowBox[{"\[Gamma]", "\[CenterDot]", 
        FormBox[
         FormBox["q1",
          TraditionalForm],
         TraditionalForm]}], "+", 
       RowBox[{"\[Gamma]", "\[CenterDot]", 
        FormBox[
         FormBox["q2",
          TraditionalForm],
         TraditionalForm]}]}], ")"}], ".", 
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Nu]",
        TraditionalForm],
       TraditionalForm]]}]}]}], TraditionalForm]], "Output",
 ImageSize->{400, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 "If the input expression contains ",
 ButtonBox["DiracSigma",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSigma",
  ButtonNote->"DiracSigma"],
 ",  ",
 ButtonBox["DiracGammaExpand",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaExpand",
  ButtonNote->"DiracGammaExpand"],
 " will expand Feynman slashes inside ",
 ButtonBox["DiracSigma",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSigma",
  ButtonNote->"DiracSigma"],
 " and call ",
 ButtonBox["DiracSigmaExpand",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSigmaExpand",
  ButtonNote->"DiracSigma"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracSigma", "[", 
  RowBox[{
   RowBox[{"GSD", "[", 
    RowBox[{"p", "+", "q"}], "]"}], ",", 
   RowBox[{"GSD", "[", "r", "]"}]}], "]"}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  SuperscriptBox["\[Sigma]", 
   RowBox[{
    FormBox[
     RowBox[{"p", "+", "q"}],
     TraditionalForm], 
    FormBox["r",
     TraditionalForm]}]], TraditionalForm]], "Output",
 ImageSize->{55, 14},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracGammaExpand", "[", "%", "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   SuperscriptBox["\[Sigma]", 
    RowBox[{
     FormBox[
      FormBox["p",
       TraditionalForm],
      TraditionalForm], 
     FormBox[
      FormBox["r",
       TraditionalForm],
      TraditionalForm]}]], "+", 
   SuperscriptBox["\[Sigma]", 
    RowBox[{
     FormBox[
      FormBox["q",
       TraditionalForm],
      TraditionalForm], 
     FormBox[
      FormBox["r",
       TraditionalForm],
      TraditionalForm]}]]}], TraditionalForm]], "Output",
 ImageSize->{85, 14},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[TextData[{
 "The call to ",
 ButtonBox["DiracSigmaExpand",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSigmaExpand",
  ButtonNote->"DiracSigma"],
 " can be inhibited by disabling the corresponding option."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracGammaExpand", "[", 
  RowBox[{
   RowBox[{"DiracSigma", "[", 
    RowBox[{
     RowBox[{"GSD", "[", 
      RowBox[{"p", "+", "q"}], "]"}], ",", 
     RowBox[{"GSD", "[", "r", "]"}]}], "]"}], ",", 
   RowBox[{"DiracSigmaExpand", "\[Rule]", "False"}]}], "]"}]], "Input",
 CellLabel->"In[3]:="],

Cell[BoxData[
 FormBox[
  RowBox[{"DiracSigma", "(", 
   RowBox[{
    RowBox[{
     RowBox[{"\[Gamma]", "\[CenterDot]", 
      FormBox[
       FormBox["p",
        TraditionalForm],
       TraditionalForm]}], "+", 
     RowBox[{"\[Gamma]", "\[CenterDot]", 
      FormBox[
       FormBox["q",
        TraditionalForm],
       TraditionalForm]}]}], ",", 
    RowBox[{"\[Gamma]", "\[CenterDot]", 
     FormBox[
      FormBox["r",
       TraditionalForm],
      TraditionalForm]}]}], ")"}], TraditionalForm]], "Output",
 ImageSize->{197, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[3]="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 "Use ",
 ButtonBox["DiracSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSimplify",
  ButtonNote->"DiracSimplify"],
 " f",
 ButtonBox["or",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaExpand",
  ButtonNote->"DiracGammaExpand"],
 " noncommutative expansions with the corresponding simplifications."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracSimplify", "[", 
  RowBox[{
   RowBox[{"GS", "[", "q", "]"}], ".", 
   RowBox[{"(", 
    RowBox[{"GS", "[", 
     RowBox[{"p", "-", "q"}], "]"}], ")"}]}], "]"}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}], ".", 
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["p",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}]}], "-", 
   SuperscriptBox[
    FormBox[
     OverscriptBox[
      FormBox["q",
       TraditionalForm], "_"],
     TraditionalForm], "2"]}], TraditionalForm]], "Output",
 ImageSize->{139, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[TextData[{
 "If simplifications are not required, you may also combine ",
 ButtonBox["DiracGammaExpand",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaExpand",
  ButtonNote->"DiracGammaExpand"],
 " with ",
 ButtonBox["DotSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DotSimplify",
  ButtonNote->"DotSimplify"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DotSimplify", "[", 
  RowBox[{"DiracGammaExpand", "[", 
   RowBox[{
    RowBox[{"GS", "[", "q", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{"GS", "[", 
      RowBox[{"p", "-", "q"}], "]"}], ")"}]}], "]"}], "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}], ".", 
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["p",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}]}], "-", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}], ".", 
    RowBox[{"(", 
     RowBox[{
      OverscriptBox["\[Gamma]", "_"], "\[CenterDot]", 
      FormBox[
       OverscriptBox[
        FormBox["q",
         TraditionalForm], "_"],
       TraditionalForm]}], ")"}]}]}], TraditionalForm]], "Output",
 ImageSize->{214, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell["", "SectionFooterSpacer"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{6, 0}],
    CacheGraphics->False],
   Spacer[6]]]],
 "See Also"
}], "SeeAlsoSection",
 WholeCellGroupOpener->True,
 CellID->1255426704],

Cell[TextData[{
 StyleBox[ButtonBox["DiracGamma",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGamma",
  ButtonNote->"DiracGamma"],
  FontFamily->"Verdana"],
 ", ",
 StyleBox[ButtonBox["DiracGammaCombine",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracGammaCombine",
  ButtonNote->"DiracGammaCombine"],
  FontFamily->"Verdana"],
 ", ",
 StyleBox[ButtonBox["DiracSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSimplify",
  ButtonNote->"DiracSimplify"],
  FontFamily->"Verdana"],
 ", ",
 StyleBox[ButtonBox["DiracTrick",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracTrick",
  ButtonNote->"DiracTrick"],
  FontFamily->"Verdana"],
 "."
}], "SeeAlso"]
}, Open  ]],

Cell[" ", "FooterCell"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{725, 750},
WindowMargins->{{-10, Automatic}, {Automatic, -8}},
WindowTitle->"DiracGammaExpand",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "SymbolColor", "LinkTrails" -> 
  GridBox[{{
      RowBox[{
        ButtonBox[
        "FeynCalc", ButtonData -> "paclet:FeynCalc/guide/FeynCalc", 
         BaseStyle -> {"Link", "DockedLinkTrail"}]}]}}, ColumnAlignments -> 
    Left], "HasOptions" -> False, "ExampleCounter" -> 1, "NeedPlatMsgIn" -> 
  None, "RootCaptions" -> "", 
  "Metadata" -> {
   "built" -> "{2020, 6, 20, 19, 3, 56.527126}", 
    "history" -> {"9.0", "", "", ""}, "context" -> "FeynCalc`", 
    "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Feyn Calc Symbol", "language" -> "en", "paclet" -> "FeynCalc", "status" -> 
    "None", "summary" -> 
    "DiracGammaExpand[exp] expands Dirac matrices contracted to linear \
combinations of 4-vectors.", "synonyms" -> {}, "tabletags" -> {}, "title" -> 
    "DiracGammaExpand", "titlemodifier" -> "", "windowtitle" -> 
    "DiracGammaExpand", "type" -> "Symbol", "uri" -> 
    "FeynCalc/ref/DiracGammaExpand"}, "SearchTextTranslated" -> ""},
CellContext->"Global`",
FrontEndVersion->"10.4 for Linux x86 (64-bit) (April 11, 2016)",
StyleDefinitions->Notebook[{
   Cell[
    StyleData[
    StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb"]]], 
   Cell[
    StyleData["Input"], CellContext -> "Global`"], 
   Cell[
    StyleData["Output"], CellContext -> "Global`"]}, Visible -> False, 
  FrontEndVersion -> "10.4 for Linux x86 (64-bit) (April 11, 2016)", 
  StyleDefinitions -> "Default.nb"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "PrimaryExamplesSection"->{
  Cell[6639, 208, 387, 15, 31, "PrimaryExamplesSection",
   CellTags->"PrimaryExamplesSection",
   CellID->378744683]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"PrimaryExamplesSection", 27168, 1021}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[588, 21, 3344, 79, 53, "AnchorBarGrid",
 CellID->1],
Cell[3935, 102, 293, 11, 45, "ObjectNameGrid"],
Cell[CellGroupData[{
Cell[4253, 117, 466, 14, 85, "Usage",
 CellID->982511436],
Cell[CellGroupData[{
Cell[4744, 135, 737, 24, 31, "NotesSection",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->36006772],
Cell[5484, 161, 31, 0, 70, "SectionHeaderSpacer"],
Cell[5518, 163, 504, 18, 70, "Notes"],
Cell[CellGroupData[{
Cell[6047, 185, 100, 2, 70, "Input"],
Cell[6150, 189, 428, 12, 56, "Output"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[6639, 208, 387, 15, 31, "PrimaryExamplesSection",
 CellTags->"PrimaryExamplesSection",
 CellID->378744683],
Cell[CellGroupData[{
Cell[7051, 227, 195, 6, 26, "ExampleSection",
 CellID->703574402],
Cell[CellGroupData[{
Cell[7271, 237, 154, 5, 27, "Input"],
Cell[7428, 244, 841, 32, 37, "Output"]
}, Open  ]],
Cell[8284, 279, 597, 22, 36, "Notes"],
Cell[CellGroupData[{
Cell[8906, 305, 92, 2, 27, "Input"],
Cell[9001, 309, 805, 30, 37, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9843, 344, 88, 2, 27, "Input"],
Cell[9934, 348, 449, 13, 69, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[10420, 366, 105, 2, 9, "ExampleDelimiter"],
Cell[10528, 370, 207, 7, 32, "Notes"],
Cell[CellGroupData[{
Cell[10760, 381, 210, 7, 27, "Input"],
Cell[10973, 390, 938, 36, 37, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[11948, 431, 93, 2, 27, "Input"],
Cell[12044, 435, 749, 28, 37, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[12830, 468, 88, 2, 27, "Input"],
Cell[12921, 472, 346, 10, 51, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[13316, 488, 105, 2, 9, "ExampleDelimiter"],
Cell[13424, 492, 126, 3, 32, "Notes"],
Cell[CellGroupData[{
Cell[13575, 499, 585, 18, 45, "Input"],
Cell[14163, 519, 1730, 66, 37, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[15930, 590, 178, 5, 27, "Input"],
Cell[16111, 597, 1459, 54, 37, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[17619, 657, 105, 2, 9, "ExampleDelimiter"],
Cell[17727, 661, 657, 22, 49, "Notes"],
Cell[CellGroupData[{
Cell[18409, 687, 196, 6, 27, "Input"],
Cell[18608, 695, 314, 12, 35, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[18959, 712, 92, 2, 27, "Input"],
Cell[19054, 716, 605, 26, 35, "Output"]
}, Open  ]],
Cell[19674, 745, 240, 7, 32, "Notes"],
Cell[CellGroupData[{
Cell[19939, 756, 320, 9, 45, "Input"],
Cell[20262, 767, 626, 23, 37, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[20937, 796, 105, 2, 9, "ExampleDelimiter"],
Cell[21045, 800, 373, 12, 32, "Notes"],
Cell[CellGroupData[{
Cell[21443, 816, 223, 7, 27, "Input"],
Cell[21669, 825, 757, 29, 39, "Output"]
}, Open  ]],
Cell[22441, 857, 374, 12, 32, "Notes"],
Cell[CellGroupData[{
Cell[22840, 873, 269, 8, 27, "Input"],
Cell[23112, 883, 1070, 40, 37, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[24221, 928, 31, 0, 29, "SectionFooterSpacer"]
}, Open  ]],
Cell[CellGroupData[{
Cell[24289, 933, 270, 12, 31, "SeeAlsoSection",
 CellID->1255426704],
Cell[24562, 947, 718, 25, 56, "SeeAlso"]
}, Open  ]],
Cell[25295, 975, 23, 0, 41, "FooterCell"]
}
]
*)

(* End of internal cache information *)

